﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace Microsoft.WowAddonStudio.FrameXml.Components.Support
{
    public class FrameXmlPaintEventArgs : PaintEventArgs
    {
        private readonly FrameXmlGraphics frameXmlGraphics;

        /// <summary>
        /// Initializes a new instance of the <see cref="FrameXmlPaintEventArgs"/> class.
        /// </summary>
        /// <param name="frameXmlGraphics">The frame XML graphics context.</param>
        /// <param name="clipRectangle">The clip rectangle.</param>
        public FrameXmlPaintEventArgs(FrameXmlGraphics frameXmlGraphics, Rectangle clipRectangle)
            : base(frameXmlGraphics.Graphics, clipRectangle)
        {
            if (frameXmlGraphics == null)
                throw new ArgumentNullException("frameXmlGraphics");

            this.frameXmlGraphics = frameXmlGraphics;
        }

        /// <summary>
        /// Gets the FrameXML Graphics context.
        /// </summary>
        public FrameXmlGraphics FrameXmlGraphics
        {
            get { return frameXmlGraphics; }
        }
    }
}
